Import data and phylogenies

Frogs

## [1] TRUE

Salamanders

Fishes

## [1] TRUE

Squamates

## [1] FALSE

Cornea diameter vs. mass

Frogs

Match data to tree & fit PGLS in caper

## $tree_not_data
## [1] "Anodonthyla_boulengerii_Microhylidae"          
## [2] "Leptobrachella_bidoupensis_Megophryidae"       
## [3] "Microhyla_fissipes_Microhylidae"               
## [4] "Microhyla_fusca_Microhylidae"                  
## [5] "Microhyla_marmorata_Microhylidae"              
## [6] "Microhyla_pulverata_Microhylidae"              
## [7] "Nasikabatrachus_sahyadrensis_Nasikabatrachidae"
## 
## $data_not_tree
## character(0)
## [1] "Leptobrachella_bidoupensis_Megophryidae"       
## [2] "Nasikabatrachus_sahyadrensis_Nasikabatrachidae"
## [3] "Anodonthyla_boulengerii_Microhylidae"          
## [4] "Microhyla_pulverata_Microhylidae"              
## [5] "Microhyla_fusca_Microhylidae"                  
## [6] "Microhyla_fissipes_Microhylidae"               
## [7] "Microhyla_marmorata_Microhylidae"
## character(0)

## 
## Call:
## pgls(formula = log10(cor_av) ~ log10(mass_av), data = frog.cdmass.comp, 
##     lambda = "ML", param.CI = 0.95)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -0.28753 -0.06242 -0.01143  0.04899  0.39358 
## 
## Branch length transformations:
## 
## kappa  [Fix]  : 1.000
## lambda [ ML]  : 0.875
##    lower bound : 0.000, p = < 2.22e-16
##    upper bound : 1.000, p = 3.1392e-08
##    95.0% CI   : (0.775, 0.940)
## delta  [Fix]  : 1.000
## 
## Coefficients:
##                Estimate Std. Error t value  Pr(>|t|)    
## (Intercept)    0.368374   0.055494  6.6381 2.639e-10 ***
## log10(mass_av) 0.747702   0.031120 24.0266 < 2.2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.09844 on 211 degrees of freedom
## Multiple R-squared: 0.7323,  Adjusted R-squared: 0.7311 
## F-statistic: 577.3 on 1 and 211 DF,  p-value: < 2.2e-16

Salamanders

Match data to tree & fit PGLS in caper

## $tree_not_data
## character(0)
## 
## $data_not_tree
## [1] "Pleurodeles_waltl_gilled"
## character(0)
## [1] "Pleurodeles_waltl_gilled"

## 
## Call:
## pgls(formula = log10(cor_av) ~ log10(rootmass_av), data = sal.cdmass.comp, 
##     lambda = "ML", param.CI = 0.95)
## 
## Residuals:
##       Min        1Q    Median        3Q       Max 
## -0.031038 -0.005368 -0.000095  0.004781  0.041013 
## 
## Branch length transformations:
## 
## kappa  [Fix]  : 1.000
## lambda [ ML]  : 0.832
##    lower bound : 0.000, p = 8.4377e-15
##    upper bound : 1.000, p = 5.6595e-09
##    95.0% CI   : (0.683, 0.922)
## delta  [Fix]  : 1.000
## 
## Coefficients:
##                    Estimate Std. Error t value  Pr(>|t|)    
## (Intercept)        0.184679   0.057335  3.2211  0.001566 ** 
## log10(rootmass_av) 0.586098   0.051971 11.2773 < 2.2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.01006 on 150 degrees of freedom
## Multiple R-squared: 0.4588,  Adjusted R-squared: 0.4552 
## F-statistic: 127.2 on 1 and 150 DF,  p-value: < 2.2e-16

Plot for cornea vs. mass

Plot that includes color codes for habitat in addition to regressions for frogs & salamanders

Add traits to frog and salamander datasets

Stopping here because want to discuss before proceeding further.

Eye diameter vs. mass

Frogs

Match data to tree & fit PGLS in caper

## $tree_not_data
## [1] "Leptobrachella_bidoupensis_Megophryidae"
## [2] "Microhyla_fissipes_Microhylidae"        
## [3] "Microhyla_fusca_Microhylidae"           
## [4] "Microhyla_marmorata_Microhylidae"       
## [5] "Microhyla_pulverata_Microhylidae"       
## 
## $data_not_tree
## character(0)
## [1] "Leptobrachella_bidoupensis_Megophryidae"
## [2] "Microhyla_pulverata_Microhylidae"       
## [3] "Microhyla_fusca_Microhylidae"           
## [4] "Microhyla_fissipes_Microhylidae"        
## [5] "Microhyla_marmorata_Microhylidae"
## character(0)

## 
## Call:
## pgls(formula = log10(eye_av) ~ log10(mass_av), data = frog.edmass.comp, 
##     lambda = "ML", param.CI = 0.95)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -0.39281 -0.07739 -0.00560  0.06081  0.40551 
## 
## Branch length transformations:
## 
## kappa  [Fix]  : 1.000
## lambda [ ML]  : 0.961
##    lower bound : 0.000, p = < 2.22e-16
##    upper bound : 1.000, p = 0.012383
##    95.0% CI   : (0.900, 0.994)
## delta  [Fix]  : 1.000
## 
## Coefficients:
##                Estimate Std. Error t value  Pr(>|t|)    
## (Intercept)    0.455710   0.062496  7.2918 5.916e-12 ***
## log10(mass_av) 0.822677   0.028023 29.3573 < 2.2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.1084 on 213 degrees of freedom
## Multiple R-squared: 0.8018,  Adjusted R-squared: 0.8009 
## F-statistic: 861.9 on 1 and 213 DF,  p-value: < 2.2e-16

Salamanders

## 
## Call:
## pgls(formula = log10(eye_av) ~ log10(rootmass_av), data = sal.cdmass.comp, 
##     lambda = "ML", param.CI = 0.95)
## 
## Residuals:
##        Min         1Q     Median         3Q        Max 
## -0.0180704 -0.0036954 -0.0000669  0.0035026  0.0228160 
## 
## Branch length transformations:
## 
## kappa  [Fix]  : 1.000
## lambda [ ML]  : 0.845
##    lower bound : 0.000, p = 3.0531e-11
##    upper bound : 1.000, p = 2.8592e-06
##    95.0% CI   : (0.658, 0.942)
## delta  [Fix]  : 1.000
## 
## Coefficients:
##                    Estimate Std. Error t value  Pr(>|t|)    
## (Intercept)        0.398691   0.042603  9.3584  2.22e-16 ***
## log10(rootmass_av) 0.773017   0.041458 18.6458 < 2.2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.006815 on 136 degrees of freedom
##   (14 observations deleted due to missingness)
## Multiple R-squared: 0.7188,  Adjusted R-squared: 0.7167 
## F-statistic: 347.7 on 1 and 136 DF,  p-value: < 2.2e-16

Fishes

Match data to tree & fit PGLS in caper

## [1] "OK"
## character(0)
## character(0)

## 
## Call:
## pgls(formula = log10(TD_av) ~ log10(mass_av), data = fishes.comp, 
##     lambda = "ML", param.CI = 0.95)
## 
## Residuals:
##       Min        1Q    Median        3Q       Max 
## -0.051652 -0.008660 -0.000058  0.008999  0.061939 
## 
## Branch length transformations:
## 
## kappa  [Fix]  : 1.000
## lambda [ ML]  : 0.984
##    lower bound : 0.000, p = < 2.22e-16
##    upper bound : 1.000, p = 0.00017103
##    95.0% CI   : (0.964, 0.996)
## delta  [Fix]  : 1.000
## 
## Coefficients:
##                Estimate Std. Error t value Pr(>|t|)    
## (Intercept)    0.423092   0.195990  2.1587  0.03148 *  
## log10(mass_av) 0.742976   0.031432 23.6379  < 2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.01431 on 388 degrees of freedom
##   (46 observations deleted due to missingness)
## Multiple R-squared: 0.5902,  Adjusted R-squared: 0.5891 
## F-statistic: 558.7 on 1 and 388 DF,  p-value: < 2.2e-16

Plot for eye vs. mass

Note that the salamander eye size dataset is msising the species with the smallest eyes (those had cornea measurements only), so that pushes the regression line up quite a bit.

Eye diameter vs. SVL

Frogs

Match data to tree & fit PGLS in caper

## [1] "OK"
## character(0)
## character(0)

## 
## Call:
## pgls(formula = log10(eye_av) ~ log10(svl_av), data = frog.edsvl.comp, 
##     lambda = "ML", param.CI = 0.95)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -0.34569 -0.05473  0.00599  0.06458  0.31770 
## 
## Branch length transformations:
## 
## kappa  [Fix]  : 1.000
## lambda [ ML]  : 0.963
##    lower bound : 0.000, p = < 2.22e-16
##    upper bound : 1.000, p = 0.022769
##    95.0% CI   : (0.902, 0.996)
## delta  [Fix]  : 1.000
## 
## Coefficients:
##                Estimate Std. Error t value  Pr(>|t|)    
## (Intercept)   -0.664341   0.068331 -9.7224 < 2.2e-16 ***
## log10(svl_av)  0.837692   0.024418 34.3065 < 2.2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.09626 on 218 degrees of freedom
## Multiple R-squared: 0.8437,  Adjusted R-squared: 0.843 
## F-statistic:  1177 on 1 and 218 DF,  p-value: < 2.2e-16

Salamanders

## 
## Call:
## pgls(formula = log10(eye_av) ~ log10(svl_av), data = sal.cdmass.comp, 
##     lambda = "ML", param.CI = 0.95)
## 
## Residuals:
##        Min         1Q     Median         3Q        Max 
## -0.0173372 -0.0021347  0.0006661  0.0041418  0.0154655 
## 
## Branch length transformations:
## 
## kappa  [Fix]  : 1.000
## lambda [ ML]  : 0.749
##    lower bound : 0.000, p = 3.9968e-14
##    upper bound : 1.000, p = 1.1559e-08
##    95.0% CI   : (0.506, 0.898)
## delta  [Fix]  : 1.000
## 
## Coefficients:
##                Estimate Std. Error t value  Pr(>|t|)    
## (Intercept)   -0.839890   0.079508 -10.564 < 2.2e-16 ***
## log10(svl_av)  0.782916   0.039652  19.745 < 2.2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.005834 on 136 degrees of freedom
##   (14 observations deleted due to missingness)
## Multiple R-squared: 0.7414,  Adjusted R-squared: 0.7395 
## F-statistic: 389.9 on 1 and 136 DF,  p-value: < 2.2e-16

Squamates

## $tree_not_data
##   [1] "Acanthodactylus_boskianus"   "Acanthodactylus_cantoris"   
##   [3] "Acanthodactylus_longipes"    "Acanthodactylus_pardalis"   
##   [5] "Aeluroscalabotes_felinus"    "Agkistrodon_piscivorus"     
##   [7] "Amblyrhynchus_cristatus"     "Ameiva_ameiva"              
##   [9] "Anolis_trinitatis"           "Basiliscus_basiliscus"      
##  [11] "Basiliscus_vittatus"         "Bellatorias_frerei"         
##  [13] "Boa_constrictor"             "Broadleysaurus_major"       
##  [15] "Brookesia_superciliaris"     "Callisaurus_draconoides"    
##  [17] "Calotes_mystaceus"           "Calotes_versicolor"         
##  [19] "Chalcides_ocellatus"         "Chamaeleo_africanus"        
##  [21] "Chamaeleo_chamaeleon"        "Chamaesaura_macrolepis"     
##  [23] "Coleonyx_elegans"            "Coleonyx_variegatus"        
##  [25] "Cordylus_cordylus"           "Cordylus_niger"             
##  [27] "Crotaphytus_bicinctores"     "Crotaphytus_collaris"       
##  [29] "Ctenosaura_hemilopha"        "Ctenosaura_similis"         
##  [31] "Cyrtodactylus_louisiadensis" "Dipsosaurus_dorsalis"       
##  [33] "Dracaena_guianensis"         "Draco_melanopogon"          
##  [35] "Eremias_persica"             "Eublepharis_hardwickii"     
##  [37] "Eublepharis_macularius"      "Eugongylus_rufescens"       
##  [39] "Eumeces_schneideri"          "Furcifer_lateralis"         
##  [41] "Furcifer_verrucosus"         "Gallotia_atlantica"         
##  [43] "Gallotia_galloti"            "Gekko_swinhonis"            
##  [45] "Gerrhosaurus_nigrolineatus"  "Glaphyromorphus_nigricaudis"
##  [47] "Gonatodes_ocellatus"         "Gonocephalus_grandis"       
##  [49] "Heliobolus_lugubris"         "Heloderma_suspectum"        
##  [51] "Hemidactylus_platycephalus"  "Iguana_iguana"              
##  [53] "Karusasaurus_polyzonus"      "Lacerta_agilis"             
##  [55] "Lacerta_viridis"             "Leiocephalus_carinatus"     
##  [57] "Leiolepis_belliana"          "Lepidodactylus_lugubris"    
##  [59] "Lepidophyma_gaigeae"         "Liopholis_whitii"           
##  [61] "Lophognathus_longirostris"   "Lygodactylus_picturatus"    
##  [63] "Meroles_anchietae"           "Meroles_knoxii"             
##  [65] "Meroles_squamulosa"          "Mesalina_guttulata"         
##  [67] "Narudasia_festiva"           "Natrix_natrix"              
##  [69] "Phelsuma_astriata"           "Phelsuma_madagascariensis"  
##  [71] "Phrynosoma_blainvillii"      "Phrynosoma_cornutum"        
##  [73] "Phyllodactylus_reissii"      "Platysaurus_guttatus"       
##  [75] "Platysaurus_intermedius"     "Plestiodon_skiltonianus"    
##  [77] "Podarcis_muralis"            "Pristurus_carteri"          
##  [79] "Pseudopus_apodus"            "Python_molurus"             
##  [81] "Quedenfeldtia_moerens"       "Saara_hardwickii"           
##  [83] "Sauromalus_ater"             "Sceloporus_grammicus"       
##  [85] "Sceloporus_horridus"         "Sceloporus_jarrovii"        
##  [87] "Sceloporus_magister"         "Sceloporus_occidentalis"    
##  [89] "Scincus_mitranus"            "Scincus_scincus"            
##  [91] "Sphaerodactylus_copei"       "Sphenodon_punctatus"        
##  [93] "Takydromus_septentrionalis"  "Tarentola_mauritanica"      
##  [95] "Thamnophis_melanogaster"     "Thamnophis_sirtalis"        
##  [97] "Tiliqua_gigas"               "Timon_lepidus"              
##  [99] "Trachylepis_perrotetii"      "Trioceros_bitaeniatus"      
## [101] "Trioceros_hoehnelii"         "Tropidurus_hispidus"        
## [103] "Tupinambis_teguixin"         "Uma_exsul"                  
## [105] "Uranoscodon_superciliosus"   "Uromastyx_aegyptia"         
## [107] "Varanus_indicus"             "Varanus_salvator"           
## [109] "Xantusia_henshawi"           "Xantusia_riversiana"        
## [111] "Xantusia_vigilis"           
## 
## $data_not_tree
## character(0)
##   [1] "Sphenodon_punctatus"         "Eremias_persica"            
##   [3] "Mesalina_guttulata"          "Acanthodactylus_pardalis"   
##   [5] "Acanthodactylus_longipes"    "Acanthodactylus_boskianus"  
##   [7] "Acanthodactylus_cantoris"    "Heliobolus_lugubris"        
##   [9] "Meroles_anchietae"           "Meroles_squamulosa"         
##  [11] "Meroles_knoxii"              "Podarcis_muralis"           
##  [13] "Takydromus_septentrionalis"  "Timon_lepidus"              
##  [15] "Lacerta_agilis"              "Lacerta_viridis"            
##  [17] "Gallotia_galloti"            "Gallotia_atlantica"         
##  [19] "Ameiva_ameiva"               "Tupinambis_teguixin"        
##  [21] "Dracaena_guianensis"         "Brookesia_superciliaris"    
##  [23] "Trioceros_bitaeniatus"       "Trioceros_hoehnelii"        
##  [25] "Chamaeleo_chamaeleon"        "Chamaeleo_africanus"        
##  [27] "Furcifer_lateralis"          "Furcifer_verrucosus"        
##  [29] "Leiolepis_belliana"          "Lophognathus_longirostris"  
##  [31] "Draco_melanopogon"           "Gonocephalus_grandis"       
##  [33] "Calotes_versicolor"          "Calotes_mystaceus"          
##  [35] "Uromastyx_aegyptia"          "Saara_hardwickii"           
##  [37] "Phrynosoma_blainvillii"      "Phrynosoma_cornutum"        
##  [39] "Uma_exsul"                   "Callisaurus_draconoides"    
##  [41] "Sceloporus_magister"         "Sceloporus_occidentalis"    
##  [43] "Sceloporus_horridus"         "Sceloporus_jarrovii"        
##  [45] "Sceloporus_grammicus"        "Anolis_trinitatis"          
##  [47] "Leiocephalus_carinatus"      "Basiliscus_vittatus"        
##  [49] "Basiliscus_basiliscus"       "Dipsosaurus_dorsalis"       
##  [51] "Sauromalus_ater"             "Iguana_iguana"              
##  [53] "Amblyrhynchus_cristatus"     "Ctenosaura_hemilopha"       
##  [55] "Ctenosaura_similis"          "Uranoscodon_superciliosus"  
##  [57] "Tropidurus_hispidus"         "Crotaphytus_bicinctores"    
##  [59] "Crotaphytus_collaris"        "Pseudopus_apodus"           
##  [61] "Heloderma_suspectum"         "Varanus_salvator"           
##  [63] "Varanus_indicus"             "Boa_constrictor"            
##  [65] "Python_molurus"              "Agkistrodon_piscivorus"     
##  [67] "Natrix_natrix"               "Thamnophis_melanogaster"    
##  [69] "Thamnophis_sirtalis"         "Platysaurus_guttatus"       
##  [71] "Platysaurus_intermedius"     "Karusasaurus_polyzonus"     
##  [73] "Chamaesaura_macrolepis"      "Cordylus_niger"             
##  [75] "Cordylus_cordylus"           "Broadleysaurus_major"       
##  [77] "Gerrhosaurus_nigrolineatus"  "Lepidophyma_gaigeae"        
##  [79] "Xantusia_riversiana"         "Xantusia_vigilis"           
##  [81] "Xantusia_henshawi"           "Glaphyromorphus_nigricaudis"
##  [83] "Eugongylus_rufescens"        "Trachylepis_perrotetii"     
##  [85] "Liopholis_whitii"            "Bellatorias_frerei"         
##  [87] "Tiliqua_gigas"               "Chalcides_ocellatus"        
##  [89] "Plestiodon_skiltonianus"     "Eumeces_schneideri"         
##  [91] "Scincus_scincus"             "Scincus_mitranus"           
##  [93] "Aeluroscalabotes_felinus"    "Eublepharis_macularius"     
##  [95] "Eublepharis_hardwickii"      "Coleonyx_elegans"           
##  [97] "Coleonyx_variegatus"         "Pristurus_carteri"          
##  [99] "Quedenfeldtia_moerens"       "Sphaerodactylus_copei"      
## [101] "Gonatodes_ocellatus"         "Narudasia_festiva"          
## [103] "Lygodactylus_picturatus"     "Phelsuma_astriata"          
## [105] "Phelsuma_madagascariensis"   "Lepidodactylus_lugubris"    
## [107] "Gekko_swinhonis"             "Cyrtodactylus_louisiadensis"
## [109] "Hemidactylus_platycephalus"  "Tarentola_mauritanica"      
## [111] "Phyllodactylus_reissii"
## character(0)

## 
## Call:
## pgls(formula = log10(TD_av) ~ log10(svl_av) * Subgroup, data = squam.edsvl.comp, 
##     lambda = "ML", param.CI = 0.95)
## 
## Residuals:
##       Min        1Q    Median        3Q       Max 
## -0.053486 -0.009735 -0.002637  0.008329  0.055101 
## 
## Branch length transformations:
## 
## kappa  [Fix]  : 1.000
## lambda [ ML]  : 1.000
##    lower bound : 0.000, p = 0.00023366
##    upper bound : 1.000, p = 1    
##    95.0% CI   : (0.794, NA)
## delta  [Fix]  : 1.000
## 
## Coefficients:
##                               Estimate Std. Error t value  Pr(>|t|)    
## (Intercept)                  -1.883245   0.244792 -7.6933 3.988e-12 ***
## log10(svl_av)                 0.858776   0.063681 13.4855 < 2.2e-16 ***
## Subgroupgeckos                0.735057   0.351075  2.0937   0.03834 *  
## log10(svl_av):Subgroupgeckos  0.081401   0.125112  0.6506   0.51650    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.01669 on 123 degrees of freedom
## Multiple R-squared: 0.6778,  Adjusted R-squared: 0.6699 
## F-statistic: 86.23 on 3 and 123 DF,  p-value: < 2.2e-16

Plot for eye vs. SVL

Note that the salamander eye size dataset is missing the species with the smallest eyes (those had cornea measurements only), so that pushes the regression line up quite a bit.

Figure

We can put these plots together to make a paneled figure

## quartz_off_screen 
##                 2